package com.base.Queue;

import java.util.concurrent.TimeUnit;
  

public class Test {  
    public static void main(String[] args) {
        OrderQueueWorker queueWorker1=new OrderQueueWorker();

        DelayOrderQueueManager manager=DelayOrderQueueManager.getInstance();

        manager.put(queueWorker1,1000,TimeUnit.MILLISECONDS);

//        String url="http://smms.sbdznkj.com:2018/SbdVoip/sign/getToken?ParentId=4ed187c8df52400884119cb47197e1c8&Mobile=18055603791";
//        DelayOrderWorker work1 = new DelayOrderWorker(url,null,3);// 任务1
////        DelayOrderWorker work2 = new DelayOrderWorker("可恶的小猫");// 任务2
////        DelayOrderWorker work3 = new DelayOrderWorker("可恶的橘子");// 任务3
////        // 延迟队列管理类，将任务转化消息体并将消息体放入延迟对列中等待执行
//            DelayOrderQueueManager manager = DelayOrderQueueManager.getInstance();
//            manager.put(work1, 3000, TimeUnit.MILLISECONDS);
//        manager.put(work2, 6000, TimeUnit.MILLISECONDS);
//        manager.put(work3, 9000, TimeUnit.MILLISECONDS);
    }  
  
}  